Quantification of caffeine in coffee cans using electrochemical measurements, machine learning, and boron-doped diamond electrodes

Electrochemical measurements, which exhibit high accuracy and sensitivity under low contamination, controlled electrolyte concentration, and pH conditions, have been used in determining various compounds. The electrochemical quantification capability decreases with an increase in the complexity of the measurement object. Therefore, solvent pretreatment and electrolyte addition are crucial in performing electrochemical measurements of specific compounds directly from beverages owing to the poor measurement quality caused by unspecified noise signals from foreign substances and unstable electrolyte concentrations. To prevent such signal disturbances from affecting quantitative analysis, spectral data of voltage-current values from electrochemical measurements must be used for principal component analysis (PCA). Moreover, this method enables highly accurate quantification even though numerical data alone are challenging to analyze. This study utilized boron-doped diamond (BDD) single-chip electrochemical detection to quantify caffeine content in commercial beverages without dilution. By applying PCA, we integrated electrochemical signals with known caffeine contents and subsequently utilized principal component regression to predict the caffeine content in unknown beverages. Consequently, we addressed existing research problems, such as the high quantification cost and the long measurement time required to obtain results after quantification. The average prediction accuracy was 93.8% compared to the actual content values. Electrochemical measurements are helpful in medical care and indirectly support our lives.

However, there are some major concerns that must be addressed by the authors in the electrochemical experiment parts.
We thank the Reviewers for their thoughtful suggestions and insights, which have enriched the manuscript and produced a better and more balanced account of the research.
1.In the method section, authors have mentioned the film thickness and boron concentration, 99 as measured by secondary ion mass spectrometry, were 5 m and >1020 cm-3, respectively.Authors have to provide this data as no supporting data is provide for these values.
Reply: As for the BDD, we use the same electrodes as those listed in Reference 21.
Therefore, the data are the same.

2.
Authors should explain why they have selected only NaCl (1g/L) solution for the measurement during the experiment with proper explanation.
Reply: The salt content of commercial beverages is stated as 1 g/kg equivalent in many of the samples used in this study.This is considered equivalent to the electrolytic mass and is used in various electrochemical tests.

3.
Authors have performed the SWV for a voltage from -2.4 V to 2.5 V while for Principal component analysis the selected range is 1.55 V and 1.65 V. What is the explanation for this voltage range variation.Is there any specific reason for this?
Reply: As a result of the results obtained in this study, readings between 1.55 V and 1.65 V were sufficient for peak separation and quantitation of caffeine.In the study phase, the measured waveform of the whole spectrum was also measured because it was assumed that it would be used for machine learning.

4.
In Machine learning for quantification of caffeine in beverages section, the values of Caffeine content given by manufacturer and the data provided after machine learning parameters has large variation.I wanted to know what is the permissible values or standard deviation that can be accepted for the comparison of experimental results and AI results in such cases.
Reply: Quantitative accuracy from machine learning is significantly improved by the sheer number of data.Various studies conducted by combining electrochemical sensors and machine learning often show SD values of less than 5%.Therefore, in order to further develop this research, it is necessary to further increase the amount of learning and aim for an accuracy of less than 5% SD for all manufacturers' products.
Reviewer #2: Quantification of Caffeine in Coffee Cans Using Electrochemical Measurements, Machine Learning, and Boron-doped Diamond Electrodes.By applying PCA, they predict the caffeine content in unknown beverages.However, the work needs a wide revision of the literature regards to the electrochemical methods used to detect caffeine e more details of the experimental procedures and comparison of the results obtained with other reports in the literature and with reference methods.Thus, a major review is needed.

For introduction
Here: "Moreover, the redox voltages of the compounds that react at the electrode interface often overlap, making peak separation challenging.Boron doped diamond electrodes have excellent characteristics, such as a wide-potential window, low background current, and long-term response stability [14,15].A wide-potential window contributes to various measurable redox voltages.Furthermore, changes have been observed in the current value at which the caffeine redox reaction occurs." 1.There are several difficult to measure caffeine in several types of sample due to its high potential of oxidation.Example, there are several difficult to measure caffeine in presence of theobromine and theophylline due to the oxidations potential to be very near among them by using the BDD electrode.Please comment about this problem in your revision, and the limit detection obtained compared to your work.Moreover, please insert a table for comparison purposes to compare the linear range, LD, accuracy, precision, recovery data, work electrode, voltammetric method, type of sample, etc….Please consult this and other rappers to make a table for comparison proposals.Response: We thank the Reviewer for pointing this out to us.We are aware of this limitation inherent in our study and have tried to imply it in the study's title, emphasizing its focus specifically on coffee cans.The major advantage of our research is that we have succeeded in estimating the amount of caffeine from undiluted coffee cans, which contain a significant amount of foreign substances and are easily ridden by foreign signals, without any preprocessing by using PCA and machine learning.The HPLC molecular analysis also shows that theobromine and theophylline are not present in the coffee can.Moreover, in comparison with other reported cases, the coffee solution content, which is the solvent used in the measurement, differs significantly with the manufacturer.Therefore, it is challenging to compare the results without standardizing the solvent conditions by mixing them with a specific electrolyte or acid solution, as in other reported cases where high-quality electrochemical measurements were performed.We agree that the points you have raised are critical to the development of this research and must be resolved to extend its versatility to other substances.Therefore, we have acknowledged the same in the conclusion.The revisions made to the conclusion are as follows.

Page 26, line 334-339
The combination of electrochemical measurements and machine learning showed that quantitative estimation is possible even from solutions containing foreign substances, as long as the peaks are prominent.However, many organic compounds, including caffeine, have similar oxidation potentials.To make this technique more versatile, a new data learning method that mechanically processes the minor differences in oxidation potential between substances with similar oxidation potentials to separate peaks at a high level is required.
Response: Regarding comparisons with other papers, none of the prior literature was a suitable comparison, as the electrochemical measurement conditions were optimized in all of them.We did not create a table because the content raised concerns that it would reduce the resolution to the reader.Please point this out again if it is insufficient.
2. The comparison with quantification using the proposed methods of an HPLC need to be performed, employing a F and T-test statistical tests for a confidence level.
Response: A quantitative analysis was performed on the samples processed for HPLC with the help of the Food Cosmetics Department of the Saga Prefectural Industrial Technology Center, which has experience in the HPLC measurement of beverages.The quantitative results demonstrated that the caffeine content in all samples was lower than the amount stated on the label.There is a possibility of loss due to the pretreatment.Since comparison with HPLC is not an appropriate method when the amount listed by the manufacturer is used as the reference value, as in this case, the amount was not added to the mass spectrometry (MS).Response: Acknowledging your suggestion, the formula used for the calculation has been included in the manuscript as follows.

Page 10, line 187
A more concise equation for deriving the quantitative values from the output data was calculated following equation.α, β, γ : median value μ: average value of median values.
were observed.Please check if the peak at 0.4-0.8V is with regards to the caffeine by comparison with the literature.Another problem is that the first peak at 0.4-0.8V presented several interferences.Please comment about it.
Response: There have been no reported cases of increased current values owing to the oxidation of caffeine at the potentials mentioned in the literature.In contrast, caffeine may exhibit different electrochemical behaviors when reacting with salts.We believe that the peak in the graph you pointed out was caused by the suspension of caffeine in a significant amount of salt.Moreover, the peaks between 0.4 and 0.8 V are the oxidation potentials of large amounts of organic compounds and hydroxy groups, as you rightly pointed out, which can cause a lot of interference.In the actual coffee can, a strong increase in current was observed in the corresponding area, but no such interference was observed around 1.6 V.This method enables quantification using the 1.6 V caffeine peak from machine learning, even if the undiluted solution is used for electrochemical measurement without any pretreatment.
Therefore, the manufacturer's donation value can be quantified without being significantly affected by interference.We have included graphs of all measurements taken with actual undiluted coffee cans.Kindly find them below.Reviewer #3: In the current study, the authors quantified the caffeine content in different coffee cans using electrochemical measurements, boron-doped diamond electrodes, and machine learning techniques.The developed boron-doped diamond electrode was further characterized with SEM, AFM, and electrochemical stability.Substory, Asahi, KIRIN, COKA-COLA, and UCC were commercially available caffeine products used in the current study.
The following correction needs to be carried out.
2. Suntory product A can be modified as a Suntory sample, if the author wants to change it.2, labeling should be provided carefully to differentiate the samples, For Example, KIRIN product A or 1 and KIRIN product B or 2, and the same trends should be followed for other samples in Table 2.

In Table
Response: Based on your suggestions, we have incorporated all changes in our manuscript.
For your reference, as an example, Table 1 is listed below.Reviewer #4: The manuscript deserves publication after major revisions: I consider that the statistical analysis is lacking (the method was partially evaluated) and according to results reported in the manuscript, clearly no replicates have been made.I consider that some data seem to be necessary to complete the work and improve its scientific quality such as error intervals, LOD, LOQ (indicating equations used), robustness, recovery with standard deviation, uncertainty of measurement, standard deviation, etc.
The limit of detection has been estimated using the old, now abandoned, IUPAC definition.Response: We thank you for your valuable feedback.Kindly find our explanation for the same.
Actual sample evaluations of caffeine detection in coffee cans by five different companies' products revealed significant differences in content as well.The purpose of this study was to estimate the amount of caffeine without any processing, such as mixing an undiluted solution with a specific solvent.Therefore, it was not possible to mix a specific electrolyte mass with caffeine to stabilize caffeine kinetics, as in other reported cases of electrochemical detection of caffeine.Instead of preparing high-quality measurement data by constructing the conditions necessary to determine the LoD and LoQ, machine learning and PCA were used to estimate caffeine content from graphs that were challenging to estimate by the human eye at first glance.The emphasis of this study was to use PCA to quantify the amount of caffeine.
In addition, authors should provide sufficient information to enable the reader to establish quickly and unambiguously the exact conditions used, and also to evaluate properly the experimental results such as stability constant measurements, principally, regarding on the caffeine detection.
Reply: The relevant information was included in the experimental procedure to help any future reproduction of the experiment.The revision is as follows.

Fig 4 .
Fig 4. Results of SWV measurements of 10 coffee samples from five companies.

Table :
Quantification of the caffeine amount in a coffee can using HPLC-MS

Table 1 Caffeine quantification results for each algorithm. Caffeine content (mg/100 g) Unknown solution Manufacturer published value Analysis evaluation Logical evaluation Graded evaluation
Recommendations in Evaluation of Analytical Methods including Detection andQuantification Capabilities, Pure Appl.Chem.1995Chem., 67, 1699Chem.-1723.   .
Please adhere to modern standards, by using the accepted IUPAC recommendations based on types I and II errors (false positives and false negatives) quoted in L. A. Currie,